﻿using System;
using System.Data.OleDb;
using TheOutLetLibrary.Dominio;

namespace TheOutLetLibrary.Infraestrutura {

    public class AccessFactoryDAO : IFactoryDAO {

        public OleDbConnection GetConexao {
            get {
                return new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\totlet_apoio\\totlet_midlleware.mdb");
            }
        }

        public IGenericDAO<NotaFiscal> GetNotaFiscalDAO(OleDbTransaction transacao) {
            return new AccessNotaFiscalDAO(transacao);
        }

        public IGenericDAO<ItemNotaFiscal> GetItemNotaFiscalDAO(OleDbTransaction transacao) {
            return new AccessItemNotaFiscalDAO(transacao);
        }

        public IProdutoDAO GetProdutoDAO(OleDbTransaction transacao) {
            return new AccessProdutoDAO(transacao);
        }

        public IRemessaDAO GetRemessaDAO(OleDbTransaction transacao) {
            return new AccessRemessaDAO(transacao);
        }

        public IEmpresaDAO GetEmpresaDAO(OleDbTransaction transacao) {
            return new AccessEmpresaDAO(transacao);
        }

        public IGenericDAO<k_customer> Getk_customerDAO(OleDbTransaction transacao) {
            return new Accessk_customerDAO(transacao);
        }

        public IGenericDAO<k_phone> Getk_cellphoneDAO(OleDbTransaction transacao) {
            return new Accessk_cellphoneDAO(transacao);
        }

        public IGenericDAO<k_phone> Getk_phoneDAO(OleDbTransaction transacao) {
            return new Accessk_phoneDAO(transacao);
        }

        public IGenericDAO<k_address> Getk_addressbillingDAO(OleDbTransaction transacao) {
            return new Accessk_addressbillingDAO(transacao);
        }

        public IGenericDAO<k_address> Getk_addressshippingDAO(OleDbTransaction transacao) {
            return new Accessk_addressshippingDAO(transacao);
        }

        public IGenericDAO<k_payment> Getk_paymentDAO(OleDbTransaction transacao) {
            return new Accessk_paymentDAO(transacao);
        }

        public IGenericDAO<k_delivery> Getk_deliveryDAO(OleDbTransaction transacao) {
            return new Accessk_deliveryDAO(transacao);
        }

        public IGenericDAO<k_freight> Getk_freightDAO(OleDbTransaction transacao) {
            return new Accessk_freightDAO(transacao);
        }

        public IGenericDAO<k_orderLine> Getk_orderLineDAO(OleDbTransaction transacao) {
            return new Accessk_orderLineDAO(transacao);
        }

        public IGenericDAO<k_cart> Getk_cartDAO(OleDbTransaction transacao) {
            return new Accessk_cartDAO(transacao);
        }

        Ik_orderDAO IFactoryDAO.Getk_orderDAO(OleDbTransaction transacao) {
            return new Accessk_orderDAO(transacao);
        }

        public IGenericDAO<k_product> Getk_productDAO(OleDbTransaction transacao) {
            return new Accessk_productDAO(transacao);
        }


        public IGenericDAO<k_category> Getk_categoryDAO(OleDbTransaction transacao) {
            return new Accessk_categoryDAO(transacao);
        }

        public IGenericDAO<k_brand> Getk_brandDAO(OleDbTransaction transacao) {
            return new Accessk_brandDAO(transacao);
        }

        public IGenericDAO<k_image> Getk_imageDAO(OleDbTransaction transacao) {
            return new Accessk_imageDAO(transacao);
        }

        public IGenericDAO<k_sku> Getk_skuDAO(OleDbTransaction transacao) {
            return new Accessk_skuDAO(transacao);
        }
    }
}
